package com.ponhu.ea2.stockcenter.provider.support.enums;

/**
 * 单据调拨状态
 * @author Wang
 * @date 2021/11/9 3:10 下午
 */
public enum DocOccupyTransferStatusEnum {
    NO_TRANSFER_APPLY_AND_NO_OUT(1, "未调拨申请并且未出可售仓"),
    TRANSFER_APPLIED_AND_NO_OUT(2, "调拨已申请并且未出可售仓"),
    TRANSFER_APPLIED_AND_OUTED(3, "调拨已申请并且已出可售仓");

    private int code;

    private String name;

    DocOccupyTransferStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getName(Integer code) {
        for (DocOccupyTransferStatusEnum c : DocOccupyTransferStatusEnum.values()) {
            if (code.equals(c.getCode())) {
                return c.name;
            }
        }
        return null;
    }
}
